package com.gee.spring.cloud.aerospace.simulate.mgt.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.gee.cloud.common.core.domain.entity.BaseEntity;
import com.gee.excel.core.annotation.ExcelColumn;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;

import javax.validation.constraints.NotNull;
import java.io.Serializable;

/**
 * <p>
 * 遥测包
 * </p>
 *
 * @author gee
 * @since 2024-07-10
 */
@Getter
@Setter
@TableName("gee_cloud_satellite_telemetry_package")
@Schema(description = "遥测包")
public class SatelliteTelemetryPackage extends BaseEntity<SatelliteTelemetryPackage> {

    private static final long serialVersionUID = 1L;

    @Schema(description = "id", required = true)
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @Schema(description = "卫星id", required = true)
    @TableField(value = "sate_id")
    @NotNull(message = "卫星id不能为空")
    @ExcelColumn(header = "卫星id")
    private Long sateId;

    @Schema(description = "包识别", required = true)
    @TableField(value = "ap_id")
    @NotNull(message = "包识别不能为空")
    @ExcelColumn(header = "包识别")
    private Integer apId;

    @Schema(description = "包识别4位16进制")
    @TableField(value = "ap_id_hex_4")
    private String apIdHex4;

    @Schema(description = "归属类型", required = true)
    @TableField(value = "belong_type")
    @NotNull(message = "归属类型不能为空")
    @ExcelColumn(header = "归属类型")
    private String belongType;

    @Schema(description = "归属路径", required = true)
    @TableField(value = "belong_path")
    @NotNull(message = "归属路径不能为空")
    @ExcelColumn(header = "归属路径")
    private String belongPath;

    @Schema(description = "包名称", required = true)
    @TableField(value = "package_name")
    @NotNull(message = "包名称不能为空")
    @ExcelColumn(header = "包名称")
    private String packageName;

    @Schema(description = "包数据域长度(不含包头，单位字节)", required = true)
    @TableField(value = "package_data_length")
    @NotNull(message = "包数据域长度(不含包头，单位字节)不能为空")
    @ExcelColumn(header = "包数据域长度(不含包头，单位字节)")
    private Integer packageDataLength;


    @Override
    public Serializable pkVal() {
        return this.id;
    }

}
